package meituan;

import java.util.HashSet;
import java.util.Scanner;
import java.util.Set;

/**
 * 小团的选挑计划
 */
public class Two {
    public static void main(String[] args) {
        Scanner scan = new Scanner(System.in);
        int n = scan.nextInt();
        Set<String> set = new HashSet<>();
        String str1[] = new String[n];
        int count = 0;
        for (int i = 0; i < n; i++) {
//            String str[] = scan.nextLine().split(" ");
            String str[] = new String[n];
            for (int j = 0; j < str.length; j++) {
                str[j] = scan.nextInt() + "";
            }
            for (int j = 0; j < str.length; j++) {
                int temp = set.size();
                set.add(str[j]);
                if(set.size()!=temp){
                    str1[i] = str[j] ;
                    break;
                }
            }
        }
        for (int j = 0; j < str1.length; j++) {
            System.out.print(str1[j] + " ");
        }

    }
}
